let path = require('path')
let {CleanWebpackPlugin} = require('clean-webpack-plugin')

let webpack = require('webpack');
module.exports = {
  mode:'production',
  entry:{
    vue:['vue']
  },
  output:{
    filename:"dll_[name].js",
    path:path.resolve(__dirname,'dist'),
    library:'dll_[name]'
  },
  plugins:[
    new CleanWebpackPlugin(),
    new webpack.DllPlugin({
      name:'dll_[name]', // 需要跟上边的library保持一致
      path:path.resolve(__dirname,'dist','manifest.json')
    })
  ]
}

// 这个配置文件目前就是把vue单独打包成了一个文件